package com.wuliang.blog.annotation;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Import;
import org.springframework.core.annotation.AliasFor;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author create by HuMinhao in 2020年5月8日
 */
@Inherited
@EntityScan
@Documented
@EnableJpaAuditing
@EnableSwaggerConfig
@SpringBootApplication
@Target(ElementType.TYPE)
@EnableTransactionManagement
@Retention(RetentionPolicy.RUNTIME)
public @interface WLApplication {

    @AliasFor(annotation = Import.class, value = "value")
    Class<?>[] anotherRegistryConfigs() default {};

    @AliasFor(annotation = EntityScan.class, value = "basePackages")
    String[] anotherEntityPackages() default "";

    @AliasFor(annotation = SpringBootApplication.class, value = "scanBasePackages")
    String[] anotherScanPackages() default "";


}
